package com.mcy.cloud.product.controller;

import com.mcy.cloud.common.api.UserRemoteService;
import lombok.extern.slf4j.Slf4j;
import org.apache.dubbo.config.annotation.DubboReference;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Author:mcyang
 * @Date:2021/7/8 下午7:20
 */
@Slf4j
@RestController
@RequestMapping("product")
public class ProductController {

    @DubboReference
    private UserRemoteService userRemoteService;

    @GetMapping("hello")
    public String hello(String name) {
        log.info("{}",userRemoteService.toString());
        return userRemoteService.helloUser(name);
    }

}
